<template>
  <div>
    <el-row class="tac">
      <el-col :span="24">
        <el-menu
          :default-active="actPath"
          router
          text-color="#a27e7e"
          background-color="#faead3"
          ref="menuRef"
        >
          <el-menu-item index="1">
            <template slot="title">
              <i class="el-icon-service"></i>
              <span>首页</span>
            </template>
          </el-menu-item>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-star-off"></i>
              <span>收藏歌曲</span>
            </template>
            <el-menu-item index="2-1" :route="{ path: '/collectheat' }">
              歌曲热度
            </el-menu-item>
            <el-menu-item index="2-2" :route="{ path: '/usercollect' }">
              用户收藏
            </el-menu-item> 
          </el-submenu>
          <el-menu-item index="3" :route="{path:'/search'}">
            <template slot="title" >
              <i class="el-icon-search"></i>
              <span>搜索关键词</span>
            </template>
          </el-menu-item>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-s-promotion"></i>
              <span>歌单访问</span>
            </template>
            <el-menu-item index="4-1" :route="{ path: '/songsheetType' }">
              访问歌单类型
            </el-menu-item>
            <el-menu-item index="4-2" :route="{ path: '/songsheetSeniority' }">
              访问歌单总排行
            </el-menu-item>
            <el-menu-item index="4-3" :route="{ path: '/sheetheatdaily' }">
              访问歌单日排行
            </el-menu-item>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-thumb"></i>
              <span>评论点赞</span>
            </template>
            <el-menu-item index="5-1" :route="{ path: '/comment' }">
              评论热度
            </el-menu-item>
            <el-menu-item index="5-2" :route="{ path: '/intimacy' }">
              用户亲密度
            </el-menu-item>
          </el-submenu>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "AsideNav",
  data() {
    return {
      actPath: '1'
    }
  },
  methods: {
    getCurrentMenu() {
      this.$refs.menuRef.select(cb => this.actPath = cb)
    }
  },
  mounted() {
    this.actPath = '1'
  }
};
</script>

<style scoped>
.el-menu {
  width: 240px;
  border-right: 0px;
  letter-spacing: 1px;
}
.el-submenu {
  border-right: 0px;
}
.el-menu-item {
  font-size: 15px;
}
</style>